import {TopDesign} from "../composition/context";
import {watchEffect} from "@vue/composition-api";

export const _watchEffect: typeof watchEffect = (...args: any[]) => {
    const unwatch = (watchEffect as any)(...args);
    if (!!TopDesign.ctx) {
        TopDesign.ctx.effects.push(unwatch);
    }
    return unwatch;
};
